using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using QLNhaSach.GUI.NhanVienAdmin;
namespace QLNhaSach.GUI.NhanVienAdmin
{
    public partial class Admin : Form
    {
        public int manvadmin;
        public Admin()
        {
            InitializeComponent();
        }

        private void CloseAllChildForm()
        {
            Form[] frm = this.MdiChildren;
            for (int i = 0; i < frm.Length; i++)
            {
                frm[i].Close();
            }
        }
        private void btnTTCaNhan_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            ThongTinCaNhan frm_TTCaNhan = new ThongTinCaNhan();
            frm_TTCaNhan.manvChilder = manvadmin;
            frm_TTCaNhan.MdiParent = this;
            frm_TTCaNhan.Show();
        }

        private void Admin_Load(object sender, EventArgs e)
        {
            btnTTCaNhan_Click(sender, e);
        }



        private void buttonX4_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            CapNhapTK frm_CapNhapTK = new CapNhapTK();
            frm_CapNhapTK.MdiParent = this;
            frm_CapNhapTK.Show();
        }

        private void btnDangXuat_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            DangXuat fmDangXuat = new DangXuat();
            fmDangXuat.maNV = manvadmin;
            fmDangXuat.MdiParent = this;
            fmDangXuat.Show();
            //this.Close();
        }

        private void btnQLTaiKhoan_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            QuanLyTaiKhoan frm_QuanLyTK = new QuanLyTaiKhoan();
            frm_QuanLyTK.MdiParent = this;
            frm_QuanLyTK.Show();
        }

        private void btnTaiKhoan_Click(object sender, EventArgs e)
        {
            CloseAllChildForm();
            TaoTaiKhoan frm_TaoTK = new TaoTaiKhoan();
            frm_TaoTK.MdiParent = this;
            frm_TaoTK.Show();
        }


    }
}